feat(coverity): support retrying archived uploads - #11591
Open
vvbandeira wants to merge 4 commits into
Open
vvbandeira wants to merge 4 commits into
vvbandeira wants to merge 4 commits into
Conversation
Coverity can reject initialization after a capture completes. Preserve the source version beside the archive so a later run can upload the same result. Report invalid and failed service responses without leaking jq parse errors. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the Coverity code coverage script to separate the build capture and upload steps, adding a new upload command to reuse existing archives and improving overall error handling. The test suite is also expanded to cover these new capabilities. The review feedback highlights compatibility issues with the --fail-with-body flag in older versions of curl (prior to 7.76.0), suggesting standard --fail or omitting the flag where appropriate. Additionally, the reviewer recommends adding an explicit check for the presence of jq to prevent confusing error messages if the tool is missing.
curl added --fail-with-body in 7.76. Ubuntu 20.04 has curl 7.68, so the upload failed before it sent a request. The initialization request now has no --fail flag. An HTTP error body is not valid init JSON, so the jq check in Step 2 rejects it and reports the body. The upload and enqueue requests use --fail. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
The jq call hides its stderr. When jq was missing, the upload reported "empty response" instead of the real cause. The check runs after the skip test, so a scan-only run does not need jq. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
The Bazel CI image does not install jq. Two upload tests failed there because the script could not parse a valid reply. A third test passed only by accident. Skip these three tests when jq is missing. The test for the missing-jq error still runs on all hosts. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Coverity can reject initialization after a capture completes. Preserve the source version beside the archive so a later run can upload the same result. Report invalid and failed service responses without leaking jq parse errors.